﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace BPM.Web.Shared.Data;

public partial class OnlineUserOutput : BaseVM
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [DisplayName("业务号")]
    [Required(ErrorMessage = "业务号不能为空")]
    [JsonPropertyName("id")]
    public long Id { get; set; }

    /// <summary>
    /// 连接Id
    /// </summary>
    [DisplayName("连接Id")]
    [JsonPropertyName("connectionId")]
    public string? ConnectionId { get; set; }

    /// <summary>
    /// 用户Id
    /// </summary>
    [DisplayName("用户Id")]
    [JsonPropertyName("userId")]
    public long UserId { get; set; }

    /// <summary>
    /// 账号
    /// </summary>
    [DisplayName("账号")]
    [JsonPropertyName("account")]
    public string? Account { get; set; }

    /// <summary>
    /// 姓名
    /// </summary>
    [DisplayName("姓名")]
    [JsonPropertyName("name")]
    public string? Name { get; set; }

    /// <summary>
    /// 最后连接时间
    /// </summary>
    [DisplayName("最近访问时间")]
    [JsonPropertyName("lastTime")]
    public System.DateTimeOffset? LastTime { get; set; }

    /// <summary>
    /// 最后登录IP
    /// </summary>
    [DisplayName("登录IP")]
    [JsonPropertyName("lastLoginIp")]
    public string? LastLoginIp { get; set; }

    /// <summary>
    /// 最后登录所用浏览器
    /// </summary>
    [DisplayName("浏览器")]
    [JsonPropertyName("lastLoginBrowser")]
    public string? LastLoginBrowser { get; set; }

    /// <summary>
    /// 最后登录所用系统
    /// </summary>
    [DisplayName("操作系统")]
    [JsonPropertyName("lastLoginOs")]
    public string? LastLoginOs { get; set; }

    /// <summary>
    /// 租户id
    /// </summary>
    [DisplayName("租户id")]
    [JsonPropertyName("tenantId")]
    public long TenantId { get; set; }

    /// <summary>
    /// 租户名称
    /// </summary>
    [DisplayName("租户")]
    [JsonPropertyName("tenantName")]
    public string? TenantName { get; set; }

    /// <summary>
    /// 账号或姓名，搜索用
    /// </summary>
    [DisplayName("搜索")]
    [JsonIgnore]
    public string? SearchValue { get; set; }
}
